﻿/*  
	------------------------------------------------------------------------
	 NQ Software Development Kit Component
	
	 Homepage: http://www.awzhome.de/
	------------------------------------------------------------------------
	
	This Source Code Form is subject to the terms of the Mozilla Public
	License, v. 2.0. If a copy of the MPL was not distributed with this
	file, You can obtain one at http://mozilla.org/MPL/2.0/.
   
	The Original Code is code of NQ Software Development Kit Component.

	The Initial Developer of the Original Code is Andreas Weizel.
	Portions created by the Initial Developer are
	Copyright (C) 2012 Andreas Weizel. All Rights Reserved.
	
	Contributor(s): (none)
	
	------------------------------------------------------------------------
*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AWZhome.NQ.CommonServices;
using System.Collections.ObjectModel;
using System.Windows;

namespace AWZhome.NQsdk.Helpers
{
	/// <summary>
	/// Represents a root item in tree view of the Bar Item Browser.
	/// </summary>
	public class ThisContainerTreeItem : DependencyObject
	{
		private List<BarBandTreeItem> _treeChildren = new List<BarBandTreeItem>();

		// Using a DependencyProperty as the backing store for IsSelected.  This enables animation, styling, binding, etc...
		public static readonly DependencyProperty IsSelectedProperty =
			DependencyProperty.Register("IsSelected", typeof(bool), typeof(ThisContainerTreeItem), new UIPropertyMetadata(false));

		public List<BarBandTreeItem> Bands
		{
			get
			{
				return _treeChildren;
			}
		}

		public bool IsSelected
		{
			get
			{
				return (bool) GetValue(IsSelectedProperty);
			}
			set
			{
				SetValue(IsSelectedProperty, value);
			}
		}
	}
}
